/*
 * Copyright (c) 2020.9，华乘电气科技有限公司
 * All rights reserved.
 *
 * 文件名称：infraredspectrumprivate.h
 * 
 * 初始版本：1.0
 * 作者：洪澄
 * 创建日期：2020/09/03
 * 摘要：红外图谱数据私有定义
 * 当前版本：1.0
 */

#pragma once

#include <QString>
#include <vector>

namespace DataSpecificationGW
{
    struct InfraredExtInformationPrivate
    {
        friend class InfraredSpectrum;

        quint8 ucTemperatureUnit; // 温度单位
        qint32 iTempLatticeWidth; // 温度点阵宽度w
        qint32 iTempLatticeHeight; // 温度点阵高度h
        qint32 iVisibleLightLenL1; // 可见光照片数据长度L1
        qint32 iInfraredDataLenL2; // 红外照片数据长度L2
        float fEmissivity; // 辐射率[0~1.00]
        float fMeasureDistance; // 测试距离
        float fAtomTemperature; // 大气温度（单位：摄氏度或华氏度）
        qint8 cRelativeHumidity; // 相对湿度[0~100]
        float fReflectedTemperature; // 反射温度（单位：摄氏度或华氏度）
        float fTemperatureWidthUpper; // 温宽上限（单位：摄氏度或华氏度）
        float fTemperatureWidthLower; // 温宽下限（单位：摄氏度或华氏度）

        void skipTemperatureUnit() { bSkipTemperatureUnit = true; }
        void skipTempLatticeWidth() { bSkipTempLatticeWidth = true; }
        void skipTempLatticeHeight() { bSkipTempLatticeHeight = true; }
        void skipVisibleLightLenL1() { bSkipVisibleLightLenL1 = true; }
        void skipInfraredDataLenL2() { bSkipInfraredDataLenL2 = true; }
        void skipEmissivity() { bSkipEmissivity = true; }
        void skipMeasureDistance() { bSkipMeasureDistance = true; }
        void skipAtomTemperature() { bSkipAtomTemperature = true; }
        void skipRelativeHumidity() { bSkipRelativeHumidity = true; }
        void skipReflectedTemperature() { bSkipReflectedTemperature = true; }
        void skipTemperatureWidthUpper() { bSkipTemperatureWidthUpper = true; }
        void skipTemperatureWidthLower() { bSkipTemperatureWidthLower = true; }

        bool hasTemperatureUnit() const { return bHasTemperatureUnit; }
        bool hasTempLatticeWidth() const { return bHasTempLatticeWidth; }
        bool hasTempLatticeHeight() const { return bHasTempLatticeHeight; }
        bool hasVisibleLightLenL1() const { return bHasVisibleLightLenL1; }
        bool hasInfraredDataLenL2() const { return bHasInfraredDataLenL2; }
        bool hasEmissivity() const { return bHasEmissivity; }
        bool hasMeasureDistance() const { return bHasMeasureDistance; }
        bool hasAtomTemperature() const { return bHasAtomTemperature; }
        bool hasRelativeHumidity() const { return bHasRelativeHumidity; }
        bool hasReflectedTemperature() const { return bHasReflectedTemperature; }
        bool hasTemperatureWidthUpper() const { return bHasTemperatureWidthUpper; }
        bool hasTemperatureWidthLower() const { return bHasTemperatureWidthLower; }

        InfraredExtInformationPrivate();
        InfraredExtInformationPrivate& operator=(const InfraredExtInformationPrivate& stInfraredExtInformationPrivate);
        bool operator==(const InfraredExtInformationPrivate& stInfraredExtInformationPrivate) const;

    private:
        bool bSkipTemperatureUnit;
        bool bSkipTempLatticeWidth;
        bool bSkipTempLatticeHeight;
        bool bSkipVisibleLightLenL1;
        bool bSkipInfraredDataLenL2;
        bool bSkipEmissivity;
        bool bSkipMeasureDistance;
        bool bSkipAtomTemperature;
        bool bSkipRelativeHumidity;
        bool bSkipReflectedTemperature;
        bool bSkipTemperatureWidthUpper;
        bool bSkipTemperatureWidthLower;

        bool bHasTemperatureUnit;
        bool bHasTempLatticeWidth;
        bool bHasTempLatticeHeight;
        bool bHasVisibleLightLenL1;
        bool bHasInfraredDataLenL2;
        bool bHasEmissivity;
        bool bHasMeasureDistance;
        bool bHasAtomTemperature;
        bool bHasRelativeHumidity;
        bool bHasReflectedTemperature;
        bool bHasTemperatureWidthUpper;
        bool bHasTemperatureWidthLower;
    };

    struct InfraredDataPrivate
    {
        friend class InfraredSpectrum;

        QByteArray qbaInfraredTemperatureData;
        QByteArray qbaVisibleLightPhotoData;
        QByteArray qbaInfraredPhotoData;

        void skipInfraredTemperatureData() { bSkipInfraredTemperatureData = true; }
        void skipVisibleLightPhotoData() { bSkipVisibleLightPhotoData = true; }
        void skipInfraredPhotoData() { bSkipInfraredPhotoData = true; }

        bool hasInfraredTemperatureData() const { return bHasInfraredTemperatureData; }
        bool hasVisibleLightPhotoData() const { return bHasVisibleLightPhotoData; }
        bool hasInfraredPhotoData() const { return bHasInfraredPhotoData; }

        InfraredDataPrivate();
        InfraredDataPrivate& operator=(const InfraredDataPrivate& stInfraredDataPrivate);
        bool operator==(const InfraredDataPrivate& stInfraredDataPrivate) const;

    private:
        bool bSkipInfraredTemperatureData;
        bool bSkipVisibleLightPhotoData;
        bool bSkipInfraredPhotoData;

        bool bHasInfraredTemperatureData;
        bool bHasVisibleLightPhotoData;
        bool bHasInfraredPhotoData;
    };
}
